/*
 * UpdateResources.java
 *
 * Created on May 5, 2009, 6:21 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package im.resources;

import im.node.MobileNodeAgent;
import im.resources.ResourceStatus;
import im.resources.monitors.CPUMonitor;
import jade.core.behaviours.CyclicBehaviour;

/**
 *
 * @author bluejack
 */
public class UpdateResourcesBehaviour extends CyclicBehaviour {
    MobileNodeAgent mn = null;
    
    CPUMonitor cpu;

    
    public UpdateResourcesBehaviour (MobileNodeAgent mn) {
        this.mn = mn;
        cpu = new CPUMonitor();
    }

    public void action() {
        ResourceStatus status = mn.getStatus();
        //TODO obsoleted
        //status.setStatus(cpu.check());
        
        mn.setStatus(status);
    }
     
    
}
